define(function(require, exports, module) {
	$(function() {
		/*a链接跳转问题*/
		mui('body').on('tap', 'a', function() {
			document.location.href = this.href + "?dd_nav_bgcolor=FFFF943E";
		});

		//	日期预设
		var Tdate = new Date();
		var Year = Tdate.getFullYear();
		var Month = Tdate.getMonth() + 1;
		var day = Tdate.getDate();
		if(Month < 10) {
			Month = "0" + Month;
		}
		if(day < 10) {
			day = "0" + day;
		}
		$(".createDate").text(Year + "-" + Month + "-" + day);
		$(".lastDate").text(Year + "-" + Month + "-" + day);

		//获取焦点操作
		//onfocus="this.focused=true;this.select();" onmouseup="if(this.focused){this.focused=false;return false;}"
		var Inputs = document.getElementsByTagName("input");
		//alert(Inputs.length);
		$.each(Inputs, function(i, Input) {
			//alert(i);
			Input.onfocus = function() {
				this.focused = true;
				this.select();
				//$("#sub-btn").hide();
			};
			Input.onmouseup = function() {
				if(this.focused) {
					this.focused = false;
					return false;
				}
			};
			Input.onblur = function() {
				//$("#sub-btn").show();
			};
		});
	});

});